package edu.chc.hhsh.ros.ros_room_list;

import edu.chc.hhsh.ros.ros_room_list.*;
import com.pub.database.*;
import java.util.*;
import javax.servlet.http.*;

public class View {
   public View(){
      setMultiLang();
      setDBProperties();
   }
   private HttpServletRequest request=null;
private HttpServletResponse response=null;
public void setResponse(HttpServletResponse response) {
    this.response = response;
}

public void setRequest(HttpServletRequest request) {
    this.request = request;
}

public HttpServletResponse getResponse() {
    return response;
}

public HttpServletRequest getRequest() {
    return request;
}

   private String gstrOnloadScript;
   public String getOnloadScript(){
      return this.gstrOnloadScript;
   }
   public void setOnloadScript(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrOnloadScript=pstrParameter;
   }
   private String gstrPrgAction;
   public String getPrgAction(){
      return this.gstrPrgAction;
   }
   public void setPrgAction(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrPrgAction=pstrParameter;
   }
   private String gstrPrgStatus;
   public String getPrgStatus(){
      return this.gstrPrgStatus;
   }
   private String gstrDBAlias;
   public String getDBAlias(){
      return this.gstrDBAlias;
   }
   public void setDBAlias(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrDBAlias=pstrParameter;
   }
   private boolean gblnDBDebug;
   public boolean getDBDebug(){
      return this.gblnDBDebug;
   }
   public void setDBDebug(boolean pblnParameter){
      this.gblnDBDebug=pblnParameter;
   }
   private String gstrSourceCharset;
   public String getSourceCharset(){
      return this.gstrSourceCharset;
   }
   public void setSourceCharset(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrSourceCharset=pstrParameter;
   }
   private String gstrTargetCharset;
   public String getTargetCharset(){
      return this.gstrTargetCharset;
   }
   private String gstrPrgTitle;
   public String getPrgTitle(){
      return this.gstrPrgTitle;
   }
   public void setPrgTitle(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrPrgTitle=pstrParameter;
   }
   public void setTargetCharset(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrTargetCharset=pstrParameter;
   }
   private String gstrBtnQueryTitle;
   public String getBtnQueryTitle(){
      return this.gstrBtnQueryTitle;
   }
   public void setBtnQueryTitle(String pstrParameter){
   if(pstrParameter!=null && pstrParameter.equals("null")){pstrParameter=null;}
      this.gstrBtnQueryTitle=pstrParameter;
   }

   private String keywordsTitle=null;

    public String getKeywordsTitle() {
        return keywordsTitle;
    }

    public void setKeywordsTitle(String keywordsTitle) {
        this.keywordsTitle = keywordsTitle;
    }

   private String dataViewHtml=null;
   private DataView dataView=null;
   private DataViewForm dataViewForm=null;
   private String LoginUserNO=null;
   private String DataKind=null;
   private String Keywords=null;

    public String getKeywords() {
        return Keywords;
    }

    public void setKeywords(String Keywords) {
        this.Keywords = Keywords;
    }

    public String getDataKind() {
        return DataKind;
    }

    public void setDataKind(String DataKind) {
        this.DataKind = DataKind;
    }

    public String getLoginUserNO() {
        return LoginUserNO;
    }

    public void setLoginUserNO(String LoginUserNO) {
        this.LoginUserNO = LoginUserNO;
    }

   private void setMultiLang(){
      ResourceBundle rbdTitleResource=ResourceBundle.getBundle("edu\\chc\\hhsh\\ext\\ext_search\\Multi-lang",Locale.getDefault());

      try{
          setPrgTitle(rbdTitleResource.getString("prgQueryTitle"));
          setBtnQueryTitle(rbdTitleResource.getString("BtnQueryTitle"));
          setKeywordsTitle(rbdTitleResource.getString("keywordsTitle"));
      }
      catch(Exception e){
         e.printStackTrace();
      }
   }
   private void setDBProperties(){
      ResourceBundle rbdTitleResource=ResourceBundle.getBundle("WEB_Config",Locale.getDefault());

      try{
         setDBAlias(rbdTitleResource.getString("DB_ALIAS"));
         setDBDebug(Boolean.valueOf(rbdTitleResource.getString("DEBUG")).booleanValue());
         setSourceCharset(rbdTitleResource.getString("SOURCE_CHARSET"));
         setTargetCharset(rbdTitleResource.getString("TARGET_CHARSET"));
      }
      catch(Exception e){
         e.printStackTrace();
      }
      finally{
         rbdTitleResource=null;
      }
   }
   public String getMessage(String pstrKey){
      return ResourceBundle.getBundle("edu\\chc\\hhsh\\ext\\ext_search\\Multi-lang",Locale.getDefault()).getString(pstrKey);
   }

    public void setDataViewHtml(String dataViewHtml) {
        this.dataViewHtml = dataViewHtml;
    }

    public void setDataViewForm(DataViewForm dataViewForm) {
        this.dataViewForm = dataViewForm;
    }

    public void setDataView(DataView dataView) {
        this.dataView = dataView;
    }

    public String getDataViewHtml() {
        return dataViewHtml;
    }

    public DataViewForm getDataViewForm() {
        return dataViewForm;
    }

    public DataView getDataView() {
        return dataView;
    }
}
